import cv2 as cv

fileName =r'/Users/cuidiedie/Downloads/111.jpg'
img = cv.imread(fileName)#读取图片

# gray = cv.cvtColor(img,cv.COLOR_BGR2GRAY)

# cv.imshow("show source image",img)
# cv.imshow("gray",gray)
# cv.waitKey()

hsv = cv.cvtColor(img,cv.COLOR_BGR2HSV)#颜色检测
# cv.imshow("Hue",hsv[:,:,0])
cv.imshow("Stauration",hsv[:,:,1])
# cv.imshow("value",hsv[:,:,2])
# H - 色度 0 S - 饱和度1 V亮度2
# cv.waitKey()

# cv.imshow('blue',img[:,:,0])
# cv.imshow('green',img[:,:,1])
# cv.imshow('red',img[:,:,2])

cv.waitKey()
cv.destroyAllWindows()